﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Cosmetic.Logic;
using Cosmetic.DataEntity;

public partial class Controls_BrandOrderByCreateTime : System.Web.UI.UserControl
{
	private BrandManager m_BrandManager			= new BrandManager();
	private ProductManager m_ProductManager		= new ProductManager();

	public int ShowCount { get; set; }

	protected void Page_Load(object sender, EventArgs e)
	{
		if (!IsPostBack)
		{
			this.BindBrand();
		}
	}

	private void BindBrand()
	{
		this.rptBrand.DataSource	= this.m_BrandManager.GetAll().OrderByDescending(theBrand=>theBrand.CreateTime).Take(this.ShowCount);
		this.rptBrand.DataBind();
	}
}
